package com.glory.study.service;


import com.glory.study.dao.mapper.db1.PageDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;


@Service
public class PageService {

    @Autowired
    PageDao pageDao;

    public int findCount(String table){
        return  pageDao.findCountAll(table);
    }
    public List<HashMap<String, Object>> findMapPage(String table, int pagestart, int pagesize){
        return  pageDao.findMapPageAll(table,pagestart, pagesize);
    }
    public int findCount(String table, String strWhere){
        return  pageDao.findCount(table,strWhere);
    }
    public List<HashMap<String, Object>> findMapPage(String table,String fileds,String order,String strWhere,int pagestart,int pagesize){
        return  pageDao.findMapPage(table,fileds,order,strWhere,pagestart,pagesize);
    }

    public List<HashMap<String, Object>> findMapAll(String table,String fileds,String order,String strWhere){
        return  pageDao.findMapAll(table,fileds,order,strWhere);
    }

}